package com.qianyu.controller.back;


import com.qianyu.entity.base.Result;
import com.qianyu.entity.bean.QunMember;
import com.qianyu.entity.dto.QqMemberDto;
import com.qianyu.service.QunMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "后台qq成员管理", description = "wangzhicheng")
@RestController
@RequestMapping("/back/qq_member")
@RequiredArgsConstructor
public class QunMemberController {

    private final QunMemberService qunMemberService;

    /**
     * 根据群id获取群成员
     */
    @PostMapping("/getMemberList")
    @ApiOperation(value = "根据群id获取群成员")
    Result<List<QunMember>> getMemberList(@RequestBody @Validated QqMemberDto.QqMemberSearchDto dto) {
        return Result.success(qunMemberService.getMemberList(dto));
    }
}
